package com.run.service.impl;


import com.run.mapper.EbCommentMapper;
import com.run.model.EbComment;
import com.run.service.CommentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class CommentServiceImpI implements CommentService {
    @Autowired
    private EbCommentMapper ebCommentMapper;

    @Override
    public List<EbComment> list(int page, int pageSize) {
        return ebCommentMapper.selectByExample(null);
    }

    @Override
    public EbComment selectOne(Integer ecId) {
        return ebCommentMapper.selectByPrimaryKey(ecId);
    }

    @Override
    public Integer updateOrder(EbComment ebComment) {
        return ebCommentMapper.updateByPrimaryKey(ebComment);
    }

    @Override
    public int deltOrder(Integer ecId) {
        return ebCommentMapper.deleteByExample(ecId);
    }
}
